﻿
int i = 9;
long j = 9;

string k = "91234qwe";
char g = '9';

float z = 9.0f;
double b = 9.0;

Console.WriteLine(long.MaxValue);
Console.WriteLine(int.MaxValue);

Console.WriteLine(double.MaxValue);
Console.WriteLine(float.MaxValue);

//自定义类型
CPerson person = new CPerson(30);
Console.WriteLine(person.mAge);
//调用函数
person.addAge();
Console.WriteLine(person.mAge);

person.addAge(10);
Console.WriteLine(person.mAge);

CPerson.show();

float tar = person.ageAndHeight();
Console.WriteLine(tar);

//人：身高(float) 年龄(int)
public class CPerson
{
    public float mHeight;
    public int mAge;
    //构造函数 初始化
    public CPerson(int age)
    {
        Console.WriteLine("new");
        mAge = age;
    }

    //通用功能 CHelp loadScene
    public static void show()
    {
        Console.WriteLine("老朱说啊说");
    }

    //代码更加逻辑化
    public void addAge()
    {
        mAge++;
        //mAge = mAge+1;
    }
    public void addAge(int age)
    {
        mAge += age;
    }

    public float ageAndHeight()
    {
        return mAge + mHeight;
    }

    //默认私有 private
    float _ageAndHeight()
    {
        return mAge + mHeight;
    }
}